package com.hyb.service.impl;

import com.hyb.Vo.OrderVo;
import com.hyb.entity.Commodity;
import com.hyb.mapper.CommodityMapper;
import com.hyb.service.CommodityService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  商品Service接口实现类
 * </p>
 *
 * @author hyb
 * @since 2021-12-29
 */
@Service
public class CommodityServiceImpl extends ServiceImpl<CommodityMapper, Commodity> implements CommodityService {

    @Autowired
    private CommodityMapper commodityMapper;

    @Override
    public List<OrderVo> loadCommoditiesByOrderId(Integer orderId) {
        return commodityMapper.selectCommoditiesByOrderId(orderId);
    }
}
